package com.expressage.service.impl;

import com.expressage.dao.RecipientDao;
import com.expressage.service.RecipientService;
import com.expressage.vo.RecipientVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 收件人信息业务逻辑实现类
 *
 */
@Service
public class RecipientServiceImpl implements RecipientService {
    @Autowired
    RecipientDao recipientDao;

    @Override
    public List<RecipientVO> findAll() {

        return recipientDao.findAll();
    }

    @Override
    public RecipientVO findByReid(int reid) {
        return recipientDao.findByReid(reid);
    }

    @Override
    public boolean insert(RecipientVO recipient) {
        return recipientDao.insert(recipient)>0?true:false;
    }

    @Override
    public boolean delete(int[] reid) {
        return recipientDao.delete(reid)>0?true:false;
    }

    @Override
    public boolean update(RecipientVO recipient) {
        return recipientDao.update(recipient)>0?true:false;
    }
}
